xend: Fix refactoring done in CS 15938 in security.py.
authorKeir Fraser <keir@xensource.com>
Tue, 2 Oct 2007 08:27:22 +0000 (09:27 +0100)
committerKeir Fraser <keir@xensource.com>
Tue, 2 Oct 2007 08:27:22 +0000 (09:27 +0100)
Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
tools/python/xen/util/xsm/acm/acm.py

index 52f6ad6333b9a51f31ced35366ed4c9186ff438a..d58652e06c03a50ba2188737cbdc4404c9638691 100644 (file)
@@ -1309,7 +1309,7 @@ def parse_security_label(security_label):
         return security_label
 
 def set_security_label(policy, label):
-    if label != "" and policy != "":
+    if label and policy and label != "" and policy != "":
         return "%s:%s:%s" % (xsconstants.ACM_POLICY_ID, policy, label)
     else:
         return ""